import request from '@/utils/request'

//查询轮播图列表
export function listSwiper(query){
    return request({
        url: '/mini/swiper/list',
        method: 'get',
        params: query
      })
}

export function addSwiper(data){
  return request({
    url: '/mini/swiper/add',
    method: 'post',
    data: data
  })
}

export function updateSwiper(data){
  return request({
    url: '/mini/swiper/edit',
    method: 'post',
    data: data
  })
}

export function queryById(id){
   return request({
    url: '/mini/swiper/get?id='+ id,
    method: 'get',
   })
}

export function deleteById(ids){
  return request({
    url: '/mini/swiper/delete/'+ids,
    method: 'post'
   })
}

// 查询首页快捷按钮列表
export function listEntry(query) {
  return request({
    url: '/mini/entry/list',
    method: 'get',
    params: query
  })
}

// 查询首页快捷按钮详细
export function getEntry(id) {
  return request({
    url: '/mini/entry/' + id,
    method: 'get'
  })
}

// 新增首页快捷按钮
export function addEntry(data) {
  return request({
    url: '/mini/entry',
    method: 'post',
    data: data
  })
}

// 修改首页快捷按钮
export function updateEntry(data) {
  return request({
    url: '/mini/entry',
    method: 'put',
    data: data
  })
}

// 删除首页快捷按钮
export function delEntry(id) {
  return request({
    url: '/mini/entry/' + id,
    method: 'delete'
  })
}
